/**
 * 
 * @authors kisen  (lqs0911@qq.com)
 * @date    2019-07-30 18:42:55
 * @version $Id$
 */
'use strict';
require('./index.css');
require('page/common/nav/index.js');
require('page/common/header/index.js');
require('util/slider/index.js');
var templateBanner=require('./banner.string');
var _mm=require('util/mm.js');

$(function() {
    // 渲染banner的html
    var bannerHtml=_mm.renderHtml(templateBanner);
    $('.banner-con').html(bannerHtml);
    // 初始化banner
    var $slider=$('.banner').unslider({
        dots:true
    });
    // 前一张和后一张操作的事件绑定
    $('.banner-con .banner-arrow').click(function(){
        var forward=$(this).hasClass('prev')?'prev':'next';
        $slider.data('unslider')[forward]();
    });
});

